var GraceJS = require("../../Grace.JS/grace.js");
import {
    apiServer
} from '../../common.js';
Page({

    /**
     * 页面的初始数据
     */
    data: {
        list:[]
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
        this.getList()
    },

    getList: function () {
        var that = this;
        wx.showLoading({
          title: 'Loading',
        })
        GraceJS.get(
            apiServer + 'resume.Tutorial/TutorialList', {}, {},
            function (res) {
                if (res.code == 0) {
                    console.log(res, 'dads')
                    that.setData({
                        list: res.data,
                    })
                    wx.hideLoading()
                } else {
                    GraceJS.msg(res.message)
                }
            }
        )
    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage: function () {
        return {
            title: '全网免费IT教程',
            path: '/pages/tutorial/index',
        }
    },

    // 分享朋友圈
    onShareTimeline: function () {
        return {
            title: '全网免费IT教程',
            path: '/pages/tutorial/index',
        }
    }
})